Skip to content

[GTK4] Fix custom drawing in GTK4#2822

Closed
jonahgraham wants to merge 1 commit intoeclipse-platform:masterfrom
jonahgraham:drawing-area-instead-of-snapshots
Closed

[GTK4] Fix custom drawing in GTK4#2822
jonahgraham wants to merge 1 commit intoeclipse-platform:masterfrom
jonahgraham:drawing-area-instead-of-snapshots

Conversation

@jonahgraham
Copy link
Contributor

This involves changing the mechanism with which we do custom drawing. Previously we tried to hook into GtkWidget's snapshot, but this required messing around with the vtable of the widget to call our handler instead.

This commit changes to using GtkOverlays + GtkDrawingAreas to allow custom drawing on top of the GtkWidgets.

Fixes #2819

This involves changing the mechanism with which we do custom drawing.
Previously we tried to hook into GtkWidget's snapshot, but this
required messing around with the vtable of the widget to call
our handler instead.

This commit changes to using GtkOverlays + GtkDrawingAreas to
allow custom drawing on top of the GtkWidgets.

Fixes eclipse-platform#2819
@jonahgraham
Copy link
Contributor Author

This is draft because it is only the first step of #2819 (comment) - new commits/pushes as I get the other steps done.

@github-actions
Copy link
Contributor

Test Results

  118 files  ±0    118 suites  ±0   19m 39s ⏱️ + 3m 24s
4 653 tests ±0  4 635 ✅  - 1  18 💤 +1  0 ❌ ±0 
  338 runs  ±0    334 ✅ ±0   4 💤 ±0  0 ❌ ±0 

Results for commit 99d94c0. ± Comparison against base commit a0d6ffc.

This pull request skips 1 test.
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser_IE ‑ test_setUrl_remote_with_post

@akurtakov
Copy link
Member

#3069 fixes the issue so I propose we close this one for now. Using GtkOverlay will require far bigger changes than we can afford doing now.

@jonahgraham
Copy link
Contributor Author

I am closing this for now - the caret drawing has been fixed a different way. I still have concerns about rewriting snapshot by editing vtable, but to reduce noise I close this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[GTK4] custom Paint is under instead of over control

2 participants